/*

*/
#include <iostream>
using namespace std;

void showflags(long f) {
	long i;
	for (i = 0x8000; i; i = i >> 1)
		if (i & f)
			cout << "1";
		else
			cout << "0";
	cout << endl;
}

int main(int argc, char * argv[]) {
	long f;
	f = cout.flags();
	showflags(f);

	cout.setf(ios::showpos | ios::scientific);
	f = cout.flags();
	showflags(f);

	cout.setf(ios::scientific);
	f = cout.flags();
	showflags(f);

	return 0;
}
